<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatesLivechatsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('livecalls', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->unsignedInteger("uid",false)->comment("用户id");
            $table->unsignedInteger("room_id",false)->comment("房间号（专家id）");
            $table->unsignedInteger("live_id",false)->comment("直播id");
            $table->text("content")->comment("聊天内容");

            $table->dateTime("created_at")->useCurrent();
            $table->dateTime("updated_at")->nullable()->useCurrent();
            $table->softDeletes();
        });
        DB::statement("ALTER TABLE 'xc_livechats' comment'直播互动信息表'");//表注释
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('fcons');
    }
}
